﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewAllApplicationsUserControl.ascx.cs" Inherits="JM.JCY.SharePointComponent.Applications.ViewAllApplications.ViewAllApplicationsUserControl" %>
<script type="text/javascript">
    $(document).ready(function () {
        $("#td_MyApplication").click(function () {
            $("#divMyApplication").slideToggle("fast", function callback() {
                if ($("#divMyApplication").is(":visible")) {
                    $("#imgBtnMyApplication").attr("src", "/_Layouts/JM.JCY.Resource/images/toggle_collapse.png");
                }
                else {
                    $("#imgBtnMyApplication").attr("src", "/_Layouts/JM.JCY.Resource/images/toggle_expand.png");
                }
            });
        });

        $("#td_ExternalApplication").click(function () {
            $("#divExternalApplication").slideToggle("fast", function callback() {
                if ($("#divExternalApplication").is(":visible")) {
                    $("#imgBtnExternalApplication").attr("src", "/_Layouts/JM.JCY.Resource/images/toggle_collapse.png");
                }
                else {
                    $("#imgBtnExternalApplication").attr("src", "/_Layouts/JM.JCY.Resource/images/toggle_expand.png");
                }
            });
        });

    });
 </script>


  
    <div>
        <table class="title">
            <tr>
                <td width="60%">
                    <h2 class="gallery">
                        <img src="/_Layouts/JM.JCY.Resource/images/application.png" /> 所有应用</h2>
                </td>
            </tr>
        </table>
        <br />
        <table class="galleryHeader" border="0">
            <tr>
                <td width="100%" id="td_MyApplication" style="cursor: pointer">
                    <img id="imgBtnMyApplication" src="/_Layouts/JM.JCY.Resource/images/toggle_collapse.png"
                        alt="" />&nbsp;我的应用
                </td>
            </tr>
        </table>
        
        <div id="divMyApplication">
            <table class="galleryForm" style="padding-top: 0px; padding-bottom: 0px">
                <tr>
                    <td>
                        <div id="content1">
                            <asp:DataList ID="dlMyApps" runat="server" RepeatDirection="Horizontal" RepeatColumns="7"
                                ItemStyle-Width="14%" OnItemDataBound="dlMyApps_ItemDataBound">
                                <ItemTemplate>
                                    <div>
                                        <table width="100%">
                                            <tr>
                                                <td class="gridLogo" align="center">
                                                    <a runat="server" id="linkMyApp" class="gridLogo">
                                                        <asp:Image Width="64" Height="64" ID="ImgMyApp" runat="server" CssClass="gridLogo" ImageUrl='<%# Eval("ApplicationImgUrlBig") %>' />
                                                    </a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:LinkButton ID="lbMyApp" runat="server" Text='<%# Eval("ApplicationName") %>'></asp:LinkButton>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblDesc" runat="server" Text='<%# Eval("ApplicationDesc") %>'></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ItemTemplate>
                            </asp:DataList>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <br />
        <table class="galleryHeader">
            <tr>
                <td width="100%" id="td_ExternalApplication" style="cursor: pointer">
                    <img id="imgBtnExternalApplication" src="/_Layouts/JM.JCY.Resource/images/toggle_collapse.png"
                        alt="" />&nbsp;基础应用 
                </td>
            </tr>
        </table>
     
        <div id="divExternalApplication">
            <table  class="galleryForm" style="padding-top: 0px; padding-bottom: 0px">
                <tr>
                    <td>
                        <div id="content2">
                            <asp:DataList ID="dlExtApps" runat="server" RepeatDirection="Horizontal" RepeatColumns="7"
                                ItemStyle-Width="14%" OnItemDataBound="dlExtApps_ItemDataBound">
                                <ItemTemplate>
                                    <div>
                                        <table width="100%">
                                            <tr>
                                                <td class="gridLogo" align="center">
                                                    <a runat="server" id="linkExtApp" class="gridLogo">
                                                        <asp:Image Width="64" Height="64" ID="ImgAppExt" runat="server" CssClass="gridLogo" ImageUrl='<%# Eval("ApplicationImgUrlBig") %>' />
                                                    </a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:LinkButton ID="lbExtApp" runat="server" Text='<%# Eval("ApplicationName") %>'></asp:LinkButton>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblDesc" runat="server" Text='<%# Eval("ApplicationDesc") %>'></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </ItemTemplate>
                            </asp:DataList>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
   
